#ifndef __USART_H__
#define __USART_H__

#include "stdio.h"
#include "gd32f1x0.h"

#define UART1_TX		GPIO_PIN_9
#define UART1_RX		GPIO_PIN_10
#define UART1_IO		GPIOA

//#define UART1_TX		GPIO_PIN_6
//#define UART1_RX		GPIO_PIN_7
//#define UART1_IO		GPIOB


//extern volatile u8 Rec_VICE_DATA[28];
extern u8 Rec_VICE_DATA[28];
extern volatile u8 Rec_end;



//void USART1_Init(void);
void Usart1_Send_Byte(unsigned char tx_data);
void Usart1_Rec_CMD(void);
void Usart1_Send_CMD(void);

void gd32_uart1_init(void);
void process_received_data(uint16_t start_pos, uint16_t data_length);
extern uint8_t USART1_DMA_SendData(uint8_t *data, uint16_t length);
extern uint16_t data_received;
extern uint16_t dma_start_pos;
extern u8 receive_flag;


#endif

